@import './var.scss';

@mixin anim($type, $time) { 

    transition: $type $time;
    -moz-transition: $type $time;
    -webkit-transition: $type $time;
    -o-transition: $type $time;
    
}
@mixin bgbox() {  

    background: center/cover no-repeat;

}
@mixin bShadow() {  

    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.18);

}
/*
*边框
*$direction 方向 top bottom left right all
*$color 颜色 d    (默认颜色:var.scss里定义的) 
*            直接颜色编码或rgb、rgba
*/
@mixin border1p($direction,$color) {  

    $temp:'';
    @if($color != d){
        $temp : $color;
    }@else{
        $temp : $border-color;
    }

    @if($direction== top){
        border-top: 1px solid $temp;
    }@else if($direction== bottom){
        border-bottom: 1px solid $temp;
    }@else if($direction== left){
        border-left: 1px solid $temp;
    }@else if($direction== right){
        border-right: 1px solid $temp;
    }@else if($direction== all){
        border: 1px solid $temp;
    }

}
//渐变
@mixin change {
    background: linear-gradient(to right, #f66a3a , #f24b28);
}
//背景图
@mixin bgimg($name,$type) {
    background:url('../assets/img/'+$name+'.'+$type) center/cover no-repeat;
}
//超出省略
@mixin ellipsis {
    overflow: hidden;
    text-overflow:ellipsis;
    white-space: nowrap;
}

//渐变
@mixin newC {
    background: linear-gradient(to bottom right, #00a4ff , #0059ff);
}
